#include "DiaryMain.h"
#include "ui_DiaryMain.h"
#include "MainWindow.h"

DiaryMain::DiaryMain(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::DiaryMain){
    ui->setupUi(this);
}

DiaryMain::~DiaryMain(){
    delete ui;
}

void DiaryMain::closeEvent(QCloseEvent *){
    (dynamic_cast<MainWindow*>(parent()))->deleteWindow(this);
}
